<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:tiles="http://tiles.apache.org/tags-tiles"
	xmlns:sec="http://www.springframework.org/security/tags" xmlns:fmt="http://java.sun.com/jstl/fmt_rt"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:c="http://java.sun.com/jstl/core_rt"
	xmlns:ct="urn:jsptagdir:/WEB-INF/tags" xmlns="http://www.w3.org/1999/xhtml" version="2.0">

	<jsp:directive.page contentType="text/html" />

	<tiles:insertDefinition name="common-template">

		<tiles:putAttribute name="title" type="string" value="Main page" />

		<tiles:putAttribute name="content" type="string">
			<div id="categories">
				<ct:categories list="${categories}" level="${0}"/>
			</div>
			<div id="products">
			<c:forEach items="${products}" var="product" varStatus="st">
				<c:if test="${st.index % 3==0}">
					<div class='product_row'/>
				</c:if>
				<ct:product value="${product}" />
			</c:forEach>
			</div>
			<ct:pager params="${pagerData}" id="${category_id}"/>
		</tiles:putAttribute>

	</tiles:insertDefinition>

</jsp:root>